class Solution {
public:
    TreeNode* Mirror(TreeNode* pRoot)
    {
        if (pRoot == nullptr)
            return nullptr;
        TreeNode* left = Mirror(pRoot->left);
        TreeNode* right = Mirror(pRoot->right);
        pRoot->left = right;
        pRoot->right = left;
        return pRoot;
    }
};